package com.example.goukakuproject;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class GoukakuMainActivity extends Activity implements OnClickListener {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_goukakumain);
		this.setTitle("Trang chủ");
		Button btnN2 = (Button) findViewById(R.id.btnN2);
		btnN2.setOnClickListener(this);
		Button btnN3 = (Button) findViewById(R.id.btnN3);
		btnN3.setOnClickListener(this);
		Button btnN4 = (Button) findViewById(R.id.btnN4);
		btnN4.setOnClickListener(this);
		Button btnN5 = (Button) findViewById(R.id.btnN5);
		btnN5.setOnClickListener(this);
		Button btndoExam = (Button) findViewById(R.id.btnDoExam);
		btndoExam.setOnClickListener(this);		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.goukaku_main, menu);
		return true;
	}
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.btnN2:
			 Intent myIntent=new Intent(GoukakuMainActivity.this, GKStudylfeftmenu.class);		 
			 Bundle bundle=new Bundle();		 			 
			 bundle.putInt("N", 2);
			 myIntent.putExtra("Main", bundle);
			 startActivity(myIntent);
			break;
		case R.id.btnN3:
			 myIntent=new Intent(GoukakuMainActivity.this, GKStudylfeftmenu.class);		 
			 bundle=new Bundle();		 			 
			 bundle.putInt("N", 3);
			 myIntent.putExtra("Main", bundle);
			 startActivity(myIntent);
			break;
		case R.id.btnN4:
			myIntent=new Intent(GoukakuMainActivity.this, GKStudylfeftmenu.class);		 
			 bundle=new Bundle();		 			 
			 bundle.putInt("N", 4);
			 myIntent.putExtra("Main", bundle);
			 startActivity(myIntent);
			break;
		case R.id.btnN5:
			myIntent=new Intent(GoukakuMainActivity.this, GKStudylfeftmenu.class);		 
			 bundle=new Bundle();		 			 
			 bundle.putInt("N", 5);
			 myIntent.putExtra("Main", bundle);
			 startActivity(myIntent);
			break;
		case R.id.btnDoExam:
			break;	
			}		
	}

}
